<?php
/**
 *	@author wyl
 *	@date 2015-10-29 10:16:01
 */
Yii::import('application.components.autobid.*');
Yii::import('application.components.cronjob.class.*');
Yii::import('dao.bidAuction.*');
Yii::import('application.components.auctionCache.*');
Yii::import('application.components.auctionCache.customerCacheAuctionBidInfo');
class AutobidclientCommand extends Cronjob{
	public function runBase(){
		$autoBid=new AutoBidDao();
		$customerList=$autoBid->getAutoBidList();
		$gearClient=new AutobidClient();
		if(empty($customerList)){
			return false;
		}
		foreach ($customerList as $auctionId=>$customers){
			$workStr=json_encode(array('auctionId'=>$auctionId,'customers'=>$customers));
			$gearClient->taskDistribution('autobid', $workStr);
		} 
	}
}